import entity.Car;

import java.util.ArrayList;
import java.util.List;
import entity.*;

public class Main {


    public static void main(String[] args) {
       // System.out.println("Hello world!");

        List<Car> carList =new ArrayList<Car>();
        carList.add(Factory.SetCars("奔驰"));
        carList.add(Factory.SetCars("法拉利"));
        carList.add(Factory.SetCars("劳斯莱斯"));

        for(Car currentCar:carList){      //查询
            currentCar.showCarsInfo();
        }
    }
}